#!/bin/bash
#beetle自动清理脚本

#错误推出
function error_exit(){
	echo "ERROR:beetle自动清理错误,"$1
	exit 1
}

#清理beetle服务器日志
function clean_tomcat_log(){
	find $log_path -name "*.log" -o -name "*.txt" -mtime +60 -exec rm -rf {} \;
	find $tomcat_path/logs/ -name "*.log" -mtime +60 -exec rm -rf {} \;
	echo "" > catalina.out
}

log_path=/usr/local/applogs/beetle/
tomcat_path=/home/beetle/app/apache-tomcat-7.0.67/